<?php /*a:3:{s:70:"D:\laragon\www\uavshop\application\manage\view\verification_index.html";i:1599810569;s:56:"D:\laragon\www\uavshop\application\manage\view\base.html";i:1596192950;s:63:"D:\laragon\www\uavshop\application\manage\view\public_page.html";i:1540951044;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
	<meta name="renderer" content="webkit">
<title>后台管理系统</title>
<link rel="stylesheet" href="/static/public/awesome/css/font-awesome.min.css" />

<link rel="stylesheet" href="/static/public/layui/css/layui.css" />

<link rel="stylesheet" href="/static/public/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="/static/manage/css/style.css" />

	<link rel="stylesheet" href="/static/public/dist/zoomify.min.css">
	
<script src="/static/public/kindeditor/kindeditor-all.js"></script>
<script src="/static/public/kindeditor/lang/zh_CN.js"></script>
<script src="/static/public/ueditor/ueditor.config.js?t=<?php echo time();?>"></script>
<script src="/static/public/ueditor/ueditor.all.min.js"></script>
<script src="/static/public/ueditor/lang/zh-cn/zh-cn.js"></script>
</head>
<body>
<?php if($is_auth): ?>

<div class="g-main">
    <div class="m-main-title">
        <div class="m-container-fluid">
            <a href="<?php echo url('index/welcome'); ?>"><i class="icon icon-home"></i>首页</a>
            <span class="icon-angle-right"></span>
            <span>商城</span>
            <span class="icon-angle-right"></span>
            <span>票务管理</span>
            <span class="icon-angle-right"></span>
            <span>核销员管理</span>
            <a class="u-flush"><i class="icon-repeat"></i></a>
        </div>
    </div>
    <div class="m-main-content">
        <div class="m-container">
            <table class="m-table">
                <tr>
                    <th>
                        <div class="m-options cf">
                            <div class="m-opts fl"><a href="<?php echo url('add'); ?>" class="u-btn"><i class="icon-plus"></i>添加核销员</a></div>
                            <!--                            <div class="m-search fr">-->
                            <!--                                <form action="/manage/article/search" class="layui-form">-->
                            <!--                                    <div class="lay-select">-->
                            <!--                                        <select name="examine_status">-->
                            <!--                                            <option value="">请选择文章审核状态</option>-->
                            <!--                                            <option value="0">待审核</option>-->
                            <!--                                            <option value="1">审核通过</option>-->
                            <!--                                            <option value="2">申请驳回</option>-->
                            <!--                                        </select>-->
                            <!--                                    </div>-->
                            <!--                                    <div class="lay-select">-->
                            <!--                                        <select name="status">-->
                            <!--                                            <option value="">请选择文章状态</option>-->
                            <!--                                            <option value="0">上架</option>-->
                            <!--                                            <option value="1">下架</option>-->
                            <!--                                        </select>-->
                            <!--                                    </div>-->
                            <!--                                    <input type="submit" class="u-btn u-search" value="查看" />-->
                            <!--                                </form>-->
                            <!--                            </div>-->
                    </th>
                </tr>
            </table>
            <form class="layui-form">
                <table class="m-table mt-10">
                    <tbody class="datas">
                    <tr>
                        <th width="5%">ID</th>
                        <th width="10%">核销员名称</th>
                        <th width="10%">绑定核销码</th>
                        <th width="10%">是否绑定</th>
                        <th width="10%">绑定人员昵称</th>
                        <th width="10%">创建时间</th>
                        <th width="10%">操作</th>
                    </tr>
                    <?php if(is_array($data) || $data instanceof \think\Collection || $data instanceof \think\Paginator): if( count($data)==0 ) : echo "" ;else: foreach($data as $key=>$v): ?>
                    <tr>
                        <td><?php echo htmlentities($v['id']); ?></td>
                        <td><?php echo htmlentities($v['verification_name']); ?></td>
                        <td><div class="m-list-pic"><img src="<?php echo htmlentities($v['code']); ?>" alt="" /></td>
                        <td><?php echo htmlentities($v['binding_txt']); ?></td>
                        <td><?php echo htmlentities($v['member_nickname']); ?></td>
                        <td><?php echo htmlentities($v['created_at']); ?></td>
                        <td class="m-opt">
                            <a href="<?php echo url('add', ['id' => $v['id']]); ?>" title="编辑">编辑</a>
                            <a href="javascript:;" title="删除" id="delete" data-id="<?php echo htmlentities($v['id']); ?>">删除</a>
                            <?php if($v['is_binding'] == 1): ?>
                            <a href="javascript:;" id="binding" title="解绑"  data-id="<?php echo htmlentities($v['id']); ?>">解绑</a>
                            <?php endif; ?>

                        </td>
                    </tr>
                    <?php endforeach; endif; else: echo "" ;endif; ?>
                    </tbody>
                </table>
            </form>
            <?php if($count): ?>
<div class="m-pages mt-10">
    <div class="m-overview fl">共 <?php echo htmlentities($count); ?> 条，<?php echo htmlentities($page); ?>/<?php echo ceil($count/$limit); ?></div>
    <div class="fl" id="page"></div>
</div>
<?php endif; ?>
        </div>
    </div>
</div>

<?php endif; ?>
<input type="hidden" name="action_uri" value="<?php echo url('action'); ?>" />

<input type="hidden" name="redirect_uri" value="<?php echo url('index'); ?>" />

<input type="hidden" name="region_uri" value="/manage/regions/regions" />
<script src="/static/public/js/jquery-1.10.2.js"></script>
<script src="/static/public/js/maniac.ui.js"></script>
<script src="/static/public/layui/layui.js" charset="utf-8"></script>
<script src="/static/public/js/aes.js"></script>
<script src="/static/public/js/mode-ecb-min.js"></script>
<script src="/static/public/js/utils.js"></script>
<script src="/static/public/js/dialog.js"></script>
<script src="/static/manage/js/form.js"></script>
<script src="/static/manage/js/js.js"></script>
<script src="/static/public/js/app.js"></script>
<script src="/static/public/js/encrypt.js"></script>
<script src="/static/public/dist/zoomify.min.js"></script>
<script type="text/javascript">
    $('.fdzoom').zoomify();
</script>

<script>
var aesKey = '<?php echo htmlentities($encrypt_key); ?>';
    $(function(){
        layui.use('layer', function(){
            var user_exists = parseInt('<?php echo !empty($user_exists) ? 1  :  0; ?>');
            var user_forbidden = parseInt('<?php echo !empty($user_forbidden) ? 1  :  0; ?>');
            var quit_force = parseInt('<?php echo !empty($quit_force) ? 1  :  0; ?>');
            var is_auth    = parseInt('<?php echo !empty($is_auth) ? 1  :  0; ?>');
            
            if (user_exists) {
                dialog.error('您所登录的用户已被删除', function(){
                	top.location.href = '/manage';
                    return false;
                });
            }
            
            if (user_forbidden) {
                dialog.error('您的账户已被禁用', function(){
                	top.location.href = '/manage';
                    return false;
                });
            }

            if (quit_force) {
                dialog.error('同一账户同一时间只能一人在线', function(){
                	top.location.href = '/manage';
                    return false;
                });
            }
            
            if (!is_auth) {
                dialog.error('您没有权限执行此操作', function(){
                    window.location.href = history.go(-1);
                    return false;
                });
            }
        });
    })
</script>

<script>
    layui.use('layer', function(){
        var layer =  layui.layer;
            $('img').on('click', function () {
                var url = $(this).attr("src");
                layer.open({
                    type: 1,
                    title: false,
                    closeBtn: 0,
                    shadeClose: true,
                    area: ['10%', '18%'], //宽高
                    content: "<img src=" + url + " />"
                });
            })

        $("#binding").click(function () {
            var id = $(this).attr('data-id')
            dialog.confirm('您确定要解除绑定吗？', function(){
                $.post("<?php echo url('cancelBinding'); ?>",{id:id},function (res) {
                    layer.alert(res.message);
                    window.location.reload();
                })
            });
        })
        $("#delete").click(function () {
            var id = $(this).attr('data-id')
            dialog.confirm('您确定要删除该核销员吗？', function(){
                $.post("<?php echo url('deleteVerification'); ?>",{id:id},function (res) {
                    layer.alert(res.message);
                    window.location.reload()
                })
            });
        })
    });

</script>

</body>
</html>